<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>confirm()</title>

    <script type="text/javascript">
        var r = confirm("Press a button");
        if (r == true) {
            alert("OK")
        }
        else {
            alert("false");
        }
    </script>
</head>
<body>


</body>
</html>